
 <!DOCTYPE HTML>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
  <!-- Global Site Tag (gtag.js) - Google Analytics -->
  <script async src="https://www.googletagmanager.com/gtag/js?id=UA-84488915-1"></script>
  <script>
  window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
      gtag('js', new Date());

        gtag('config', 'UA-84488915-1');
  </script>
  
    <title>linyu blog</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    
    <meta name="author" content="linyu">
    

    
    <meta property="og:type" content="website">
<meta property="og:title" content="linyu blog">
<meta property="og:url" content="http://bigsuperangel.github.io/page/4/index.html">
<meta property="og:site_name" content="linyu blog">
<meta property="og:locale" content="zh-Hans">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="linyu blog">

    
    <link rel="alternative" href="/atom.xml" title="linyu blog" type="application/atom+xml">
    
    
    <link rel="icon" href="/img/favicon.ico">
    
    
    <link rel="apple-touch-icon" href="/img/jacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/img/jacman.jpg">
    
    <link rel="stylesheet" href="/css/style.css">
</head>

  <body>
    <header>
      
<div>
		
			<div id="imglogo">
				<a href="/"><img src="/img/logo.png" alt="linyu blog" title="linyu blog"/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/" title="linyu blog">linyu blog</a></h1>
				<h2 class="blog-motto">Where there is a will,there is a way</h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="菜單">
			</a></div>
			<nav class="animated">
				<ul>
					<ul>
					 
						<li><a href="/">Home</a></li>
					
						<li><a href="/archives">Archives</a></li>
					
						<li><a href="/tags/linux">linux</a></li>
					
						<li><a href="/tags/java">Java</a></li>
					
					<li>
 					
					<form class="search" action="//google.com/search" method="get" accept-charset="utf-8">
						<label>Search</label>
						<input type="search" id="search" name="q" autocomplete="off" maxlength="20" placeholder="搜索" />
						<input type="hidden" name="q" value="site:bigsuperangel.github.io">
					</form>
					
					</li>
				</ul>
			</nav>			
</div>
    </header>
    <div id="container">
      <div id="main">

   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/06/21/ubuntu-service/" title="ubuntu service 命令" itemprop="url">ubuntu service 命令</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-06-21T09:29:27.000Z" itemprop="datePublished"> 發表於 2016-06-21</time>
    
  </p>
</header>
    <div class="article-content">
        
        <figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">sudo<span class="built_in"> service </span>mysql stop</div><div class="line">sudo<span class="built_in"> service </span>mysql start</div><div class="line">sudo<span class="built_in"> service </span>mysql restart</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/ubuntu/">ubuntu</a><a href="/tags/service/">service</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/06/21/ubuntu-service/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/06/21/ubuntu-service/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/06/12/gradle-hotswap/" title="gradle idea 设置hotswap" itemprop="url">gradle idea 设置hotswap</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-06-12T08:11:58.000Z" itemprop="datePublished"> 發表於 2016-06-12</time>
    
  </p>
</header>
    <div class="article-content">
        
        <figure class="highlight stylus"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line">apply plugin: <span class="string">'jetty'</span></div><div class="line">jettyRun &#123;</div><div class="line">    reload = <span class="string">"automatic"</span></div><div class="line">    scanIntervalSeconds = <span class="number">1</span></div><div class="line">&#125;</div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line">task watchfiles &#123;</div><div class="line">    inputs<span class="selector-class">.files</span> <span class="string">'src'</span></div><div class="line">    doLast &#123;</div><div class="line">        compileJava</div><div class="line">    &#125;</div><div class="line">&#125;</div><div class="line"></div><div class="line">watchfiles<span class="selector-class">.finalizedBy</span> compileJava</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/gradle/">gradle</a><a href="/tags/idea/">idea</a><a href="/tags/hotswap/">hotswap</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/06/12/gradle-hotswap/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/06/12/gradle-hotswap/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/06/06/linux-search-command/" title="linux搜索命令" itemprop="url">linux搜索命令</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-06-06T07:58:37.000Z" itemprop="datePublished"> 發表於 2016-06-06</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h3 id="一、locate"><a href="#一、locate" class="headerlink" title="一、locate"></a>一、locate</h3><figure class="highlight crystal"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">/etc/updatedb.conf <span class="comment">#locate配置文件筛选规则</span></div><div class="line">locate file </div><div class="line">/var/<span class="class"><span class="keyword">lib</span>/<span class="title">mlocate</span> <span class="comment">#筛选数据库</span></span></div><div class="line">updatedb <span class="comment">#更新数据库，以用来搜索最新的文件</span></div></pre></td></tr></table></figure>
<h3 id="二、whereis"><a href="#二、whereis" class="headerlink" title="二、whereis"></a>二、whereis</h3><figure class="highlight stylus"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line">whereis -<span class="selector-tag">b</span> -m</div></pre></td></tr></table></figure>
<h3 id="三、which"><a href="#三、which" class="headerlink" title="三、which"></a>三、which</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="built_in">which</span> ll  <span class="comment">#会搜索文件别名</span></div></pre></td></tr></table></figure>
<h3 id="四、find"><a href="#四、find" class="headerlink" title="四、find"></a>四、find</h3><figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div></pre></td><td class="code"><pre><div class="line"><span class="builtin-name">find</span> / -name install.log</div><div class="line"><span class="builtin-name">find</span> /root -name <span class="string">"install.log*"</span></div><div class="line"><span class="builtin-name">find</span> /root -iname install.log #不区分大小写</div><div class="line"><span class="builtin-name">find</span> /root -nouser #搜索没有所有的文件</div><div class="line"><span class="builtin-name">find</span> /var/log/ -mtime +10  #查找10天前修改的文件</div><div class="line"></div><div class="line">-10 10天以内</div><div class="line">10 </div><div class="line">+10 10天前</div><div class="line"></div><div class="line">atime </div><div class="line">ctime</div><div class="line">mtime 修改文件内容</div><div class="line"></div><div class="line"><span class="builtin-name">find</span> /root -size -25k</div><div class="line"><span class="builtin-name">find</span> /root -inum 22222 #通过i结点查找文件</div><div class="line">-a <span class="keyword">and</span> </div><div class="line">-o <span class="keyword">or</span></div><div class="line"><span class="builtin-name">find</span> /etc -size +20k -a -size -50k -exec ls -lh &#123;&#125; \</div></pre></td></tr></table></figure>
<h3 id="五、grep"><a href="#五、grep" class="headerlink" title="五、grep"></a>五、grep</h3><figure class="highlight perl"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="keyword">grep</span> -i <span class="comment">#不区别大小写</span></div><div class="line"><span class="keyword">grep</span> -v <span class="comment">#取反</span></div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/linux/">linux</a><a href="/tags/locate/">locate</a><a href="/tags/find/">find</a><a href="/tags/grep/">grep</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/06/06/linux-search-command/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/06/06/linux-search-command/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/06/06/ubuntu-fixed-ip/" title="ubuntu 固定ip设置" itemprop="url">ubuntu 固定ip设置</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-06-06T06:37:11.000Z" itemprop="datePublished"> 發表於 2016-06-06</time>
    
  </p>
</header>
    <div class="article-content">
        
        <ul>
<li>前面提到固定IP的上网方式主要是修改/etc/network/interfaces这个文件，配置IP、网关什么的，其实这里面还有个参数可以配置，那就是DNS了，对应的参数名为dns-nameservers，这里设置的优先级比resolv.conf高，也就是网络会从这里读取DNS配置，如果没配置才去看resolv.conf里面的设置，因此在这里面配置DNS更简单。</li>
</ul>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div></pre></td><td class="code"><pre><div class="line">opback<span class="built_in"> network </span>interface</div><div class="line">auto lo</div><div class="line">iface lo inet loopback</div><div class="line"></div><div class="line"><span class="comment"># The primary network interface</span></div><div class="line">auto eth0</div><div class="line"><span class="comment">#iface eth0 inet dhcp</span></div><div class="line"></div><div class="line">iface eth0 inet static</div><div class="line"></div><div class="line">address 192.168.0.114</div><div class="line">netmask 255.255.255.0</div><div class="line">gateway 192.168.0.1</div><div class="line"></div><div class="line">dns-nameservers 211.138.151.161</div></pre></td></tr></table></figure>
<ul>
<li>重启网络</li>
</ul>
<figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">sudo<span class="built_in"> service </span>networking restart </div><div class="line">或者</div><div class="line">sudo /etc/init.d/networking restart</div><div class="line"></div><div class="line">sudo ifconfig eth0 down </div><div class="line">sudo ifconfig eth0 up</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/ubuntu/">ubuntu</a><a href="/tags/ip/">ip</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/06/06/ubuntu-fixed-ip/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/06/06/ubuntu-fixed-ip/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/06/06/redis-command/" title="redis 相关命令" itemprop="url">redis 相关命令</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-06-06T02:09:48.000Z" itemprop="datePublished"> 發表於 2016-06-06</time>
    
  </p>
</header>
    <div class="article-content">
        
        <figure class="highlight routeros"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">redis-cli -h host -p<span class="built_in"> port </span>-a password  #针对redis设置了密码</div><div class="line">keys * #查看所有的key</div><div class="line"><span class="builtin-name">SET</span> KEY_NAME VALUE</div><div class="line"><span class="builtin-name">GET</span> KEY_NAME</div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/linux/">linux</a><a href="/tags/redis/">redis</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/06/06/redis-command/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/06/06/redis-command/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/06/01/linux-vim/" title="vim 命令大全" itemprop="url">vim 命令大全</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-06-01T03:30:06.000Z" itemprop="datePublished"> 發表於 2016-06-01</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h3 id="第一级-–-存活"><a href="#第一级-–-存活" class="headerlink" title="第一级 – 存活"></a>第一级 – 存活</h3><ol>
<li><p>基本使用</p>
<blockquote>
<p>i → Insert 模式，按 ESC 回到 Normal 模式.<br>x → 删当前光标所在的一个字符。<br>:wq → 存盘 + 退出 (:w 存盘, :q 退出)   （注：:w 后可以跟文件名）<br>dd → 删除当前行，并把删除的行存到剪贴板里<br>p → 粘贴剪贴板</p>
</blockquote>
</li>
<li><p>推荐:</p>
<blockquote>
<p>hjkl (强例推荐使用其移动光标，但不必需) →你也可以使用光标键 (←↓↑→). 注: j 就像下箭头。<br>:help <command> → 显示相关命令的帮助。你也可以就输入 :help 而不跟命令。（注：退出帮助需要输入:q）</p>
</blockquote>
</li>
</ol>
<h3 id="第二级-–-感觉良好"><a href="#第二级-–-感觉良好" class="headerlink" title="第二级 – 感觉良好"></a>第二级 – 感觉良好</h3><ol>
<li><p>各种插入模式</p>
<blockquote>
<p>a → 在光标后插入<br>o → 在当前行后插入一个新行<br>O → 在当前行前插入一个新行<br>cw → 替换从光标所在位置后到一个单词结尾的字符</p>
</blockquote>
</li>
<li><p>简单的移动光标</p>
<blockquote>
<p>0 → 数字零，到行头<br>^ → 到本行第一个不是blank字符的位置（所谓blank字符就是空格，tab，换行，回车等）<br>$ → 到本行行尾<br>g_ → 到本行最后一个不是blank字符的位置。<br>/pattern → 搜索 pattern 的字符串（注：如果搜索出多个匹配，可按n键到下一个）</p>
</blockquote>
</li>
<li><p>拷贝/粘贴 （注：p/P都可以，p是表示在当前位置之后，P表示在当前位置之前）</p>
<blockquote>
<p>P → 粘贴<br>yy → 拷贝当前行当行于 ddP</p>
</blockquote>
</li>
<li><p>Undo/Redo</p>
<blockquote>
<p>u → undo<br><c-r> → redo</c-r></p>
</blockquote>
</li>
<li><p>打开/保存/退出/改变文件(Buffer)</p>
<blockquote>
<p>:e <path to="" file=""></path> → 打开一个文件<br>:w → 存盘<br>:saveas <path to="" file=""></path> → 另存为 <path to="" file=""></path><br>:x， ZZ 或 :wq → 保存并退出 (:x 表示仅在需要时保存，ZZ不需要输入冒号并回车)<br>:q! → 退出不保存 :qa! 强行退出所有的正在编辑的文件，就算别的文件有更改。<br>:bn 和 :bp → 你可以同时打开很多文件，使用这两个命令来切换下一个或上一个文件。（注：我喜欢使用:n到下一个文件）</p>
</blockquote>
</li>
</ol>
<h3 id="第三级-超能力"><a href="#第三级-超能力" class="headerlink" title="第三级-超能力"></a>第三级-超能力</h3><ol>
<li><p>按键操作：</p>
<blockquote>
<p>注释：ctrl+v 进入列编辑模式,向下或向上移动光标,把需要注释的行的开头标记起来,然后按大写的I,再插入注释符,比如”#”,再按Esc,就会全部注释了。<br>删除：先按v,进入visual模式,横向选中列的个数(如”#”注释符号,需要选中两列),再按Esc,再按ctrl+v 进入列编辑模式,向下或向上移动光标,选中注释部分,然后按d, 就会删除注释符号（#）。<br>PS：当然不一定是shell的注释符”#”，也可以是”//“，或者其他任意的字符；vim才不知道什么是注释符呢，都是字符而已。</p>
</blockquote>
</li>
<li><p>使用替换命令：</p>
<blockquote>
<p>:% s/^/\/\//g     在全部内容的行首添加//号注释<br>:2,50 s/^/\/\//g  在2~50行首添加//号注释<br>:2,50 s/^\/\///g  在2~50行首删除//号</p>
</blockquote>
</li>
</ol>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/linux/">linux</a><a href="/tags/vim/">vim</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/06/01/linux-vim/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/06/01/linux-vim/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/06/01/ubuntu-root-pwd/" title="ubuntu 默认 root 密码" itemprop="url">ubuntu 默认 root 密码</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-06-01T03:03:05.000Z" itemprop="datePublished"> 發表於 2016-06-01</time>
    
  </p>
</header>
    <div class="article-content">
        
        <p> 安装完Ubuntu后忽然意识到没有设置root密码，不知道密码自然就无法进入根用户下。到网上搜了一下，原来是这麽回事。Ubuntu的默认root密码是随机的，即每次开机都有一个新的root密码。我们可以在终端输入命令 sudo passwd，然后输入当前用户的密码，enter，终端会提示我们输入新的密码并确认，此时的密码就是root新密码。修改成功后，输入命令 su root，再输入新的密码就ok了。</p>
<figure class="highlight nginx"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="attribute">sudo</span> passwd  <span class="comment">#更改原来root密码</span></div><div class="line">su root      <span class="comment">#root帐号登陆</span></div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/ubuntu/">ubuntu</a><a href="/tags/linux/">linux</a><a href="/tags/root/">root</a><a href="/tags/pwd/">pwd</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/06/01/ubuntu-root-pwd/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/06/01/ubuntu-root-pwd/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/06/01/linux-command/" title="linux 常用命令" itemprop="url">linux 常用命令</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-06-01T02:53:03.000Z" itemprop="datePublished"> 發表於 2016-06-01</time>
    
  </p>
</header>
    <div class="article-content">
        
        <h3 id="系统"><a href="#系统" class="headerlink" title="系统"></a>系统</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"> uname -a               <span class="comment"># 查看内核/操作系统/CPU信息</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> head -n 1 /etc/issue   <span class="comment"># 查看操作系统版本 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> cat /proc/cpuinfo      <span class="comment"># 查看CPU信息</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> hostname               <span class="comment"># 查看计算机名 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> lspci -tv              <span class="comment"># 列出所有PCI设备</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> lsusb -tv              <span class="comment"># 列出所有USB设备 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> lsmod                  <span class="comment"># 列出加载的内核模块</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> env                    <span class="comment"># 查看环境变量</span></span></div></pre></td></tr></table></figure>
<h3 id="资源"><a href="#资源" class="headerlink" title="资源"></a>资源</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"> free -m                <span class="comment"># 查看内存使用量和交换区使用量 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> df -h                  <span class="comment"># 查看各分区使用情况 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> du -sh &lt;目录名&gt;        <span class="comment"># 查看指定目录的大小 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> grep MemTotal /proc/meminfo   <span class="comment"># 查看内存总量</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> grep MemFree /proc/meminfo    <span class="comment"># 查看空闲内存量</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> uptime                 <span class="comment"># 查看系统运行时间、用户数、负载 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> cat /proc/loadavg      <span class="comment"># 查看系统负载</span></span></div></pre></td></tr></table></figure>
<h3 id="磁盘和分区"><a href="#磁盘和分区" class="headerlink" title="磁盘和分区"></a>磁盘和分区</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"> mount | column -t      <span class="comment"># 查看挂接的分区状态 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> fdisk -l               <span class="comment"># 查看所有分区 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> swapon -s              <span class="comment"># 查看所有交换分区</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> hdparm -i /dev/hda     <span class="comment"># 查看磁盘参数(仅适用于IDE设备) </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> dmesg | grep IDE       <span class="comment"># 查看启动时IDE设备检测状况</span></span></div></pre></td></tr></table></figure>
<h3 id="网络"><a href="#网络" class="headerlink" title="网络"></a>网络</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"> ifconfig               <span class="comment"># 查看所有网络接口的属性</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> iptables -L            <span class="comment"># 查看防火墙设置 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> route -n               <span class="comment"># 查看路由表 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> netstat -lntp          <span class="comment"># 查看所有监听端口 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> netstat -antp          <span class="comment"># 查看所有已经建立的连接</span></span></div><div class="line"><span class="meta">#</span><span class="bash"> netstat -s             <span class="comment"># 查看网络统计信息</span></span></div></pre></td></tr></table></figure>
<h3 id="进程"><a href="#进程" class="headerlink" title="进程"></a>进程</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"> ps -ef                 <span class="comment"># 查看所有进程 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> top                    <span class="comment"># 实时显示进程状态</span></span></div></pre></td></tr></table></figure>
<h3 id="用户"><a href="#用户" class="headerlink" title="用户"></a>用户</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"> w                      <span class="comment"># 查看活动用户 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> id &lt;用户名&gt;            <span class="comment"># 查看指定用户信息 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> last                   <span class="comment"># 查看用户登录日志 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> cut -d: -f1 /etc/passwd   <span class="comment"># 查看系统所有用户 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> cut -d: -f1 /etc/group    <span class="comment"># 查看系统所有组 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> crontab -l             <span class="comment"># 查看当前用户的计划任务</span></span></div></pre></td></tr></table></figure>
<h3 id="服务"><a href="#服务" class="headerlink" title="服务"></a>服务</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"> chkconfig --list       <span class="comment"># 列出所有系统服务 </span></span></div><div class="line"><span class="meta">#</span><span class="bash"> chkconfig --list | grep on    <span class="comment"># 列出所有启动的系统服务</span></span></div></pre></td></tr></table></figure>
<h3 id="程序"><a href="#程序" class="headerlink" title="程序"></a>程序</h3><figure class="highlight shell"><table><tr><td class="gutter"><pre><div class="line">1</div></pre></td><td class="code"><pre><div class="line"><span class="meta">#</span><span class="bash"> rpm -qa                <span class="comment"># 查看所有安装的软件包</span></span></div></pre></td></tr></table></figure>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/ubuntu/">ubuntu</a><a href="/tags/linux/">linux</a><a href="/tags/command/">command</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/06/01/linux-command/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/06/01/linux-command/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/05/26/eclipse-quick-key/" title="eclipse 快捷键列表" itemprop="url">eclipse 快捷键列表</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-05-26T02:25:08.000Z" itemprop="datePublished"> 發表於 2016-05-26</time>
    
  </p>
</header>
    <div class="article-content">
        
        <ul>
<li>提示所有快捷键的快捷键是 <figure class="highlight xl"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line">ctrl+shift+L </div><div class="line">菜单是在: </div><div class="line"><span class="function"><span class="title">window</span>--&gt;</span><span class="function"><span class="title">preferences</span>--&gt;</span><span class="function"><span class="title">general</span>--&gt;</span>keys </div><div class="line"></div><div class="line">提供能容帮助是 </div><div class="line">alt+/</div></pre></td></tr></table></figure>
</li>
</ul>
<figure class="highlight less"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div></pre></td><td class="code"><pre><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">1</span> 快速修复(最经典的快捷键,就不用多说了)</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">D</span>: 删除当前行 </div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Alt</span>+↓ 复制当前行到下一行(复制增加)</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Alt</span>+↑ 复制当前行到上一行(复制增加)</div><div class="line"><span class="selector-tag">Alt</span>+↓ 当前行和下面一行交互位置(特别实用,可以省去先剪切,再粘贴了)</div><div class="line"><span class="selector-tag">Alt</span>+↑ 当前行和上面一行交互位置(同上)</div><div class="line"><span class="selector-tag">Alt</span>+← 前一个编辑的页面</div><div class="line"><span class="selector-tag">Alt</span>+→ 下一个编辑的页面(当然是针对上面那条来说了)</div><div class="line"><span class="selector-tag">Alt</span>+<span class="selector-tag">Enter</span> 显示当前选择资源(工程,or 文件 or文件)的属性</div><div class="line"><span class="selector-tag">Shift</span>+<span class="selector-tag">Enter</span> 在当前行的下一行插入空行(这时鼠标可以在当前行的任一位置,不一定是最后)</div><div class="line"><span class="selector-tag">Shift</span>+<span class="selector-tag">Ctrl</span>+<span class="selector-tag">Enter</span> 在当前行插入空行(原理同上条)</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Q</span> 定位到最后编辑的地方</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">L</span> 定位在某行 (对于程序超过<span class="number">100</span>的人就有福音了)</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">M</span> 最大化当前的<span class="selector-tag">Edit</span>或<span class="selector-tag">View</span> (再按则反之)</div><div class="line"><span class="selector-tag">Ctrl</span>+/ 注释当前行,再按则取消注释</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">O</span> 快速显示 <span class="selector-tag">OutLine</span></div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">T</span> 快速显示当前类的继承结构</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">W</span> 关闭当前<span class="selector-tag">Editer</span></div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">K</span> 参照选中的<span class="selector-tag">Word</span>快速定位到下一个</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">E</span> 快速显示当前<span class="selector-tag">Editer</span>的下拉列表(如果当前页面没有显示的用黑体表示)</div><div class="line"><span class="selector-tag">Ctrl</span>+/(小键盘) 折叠当前类中的所有代码</div><div class="line"><span class="selector-tag">Ctrl</span>+×(小键盘) 展开当前类中的所有代码</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Space</span> 代码助手完成一些代码的插入(但一般和输入法有冲突,可以修改输入法的热键,也可以暂用Alt+/来代替)</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Shift</span>+<span class="selector-tag">E</span> 显示管理当前打开的所有的<span class="selector-tag">View</span>的管理器(可以选择关闭,激活等操作)</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">J</span> 正向增量查找(按下Ctrl+J后,你所输入的每个字母编辑器都提供快速匹配定位到某个单词,如果没有,则在stutes line中显示没有找到了,查一个单词时,特别实用,这个功能Idea两年前就有了)</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Shift</span>+<span class="selector-tag">J</span> 反向增量查找(和上条相同,只不过是从后往前查)</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Shift</span>+<span class="selector-tag">F4</span> 关闭所有打开的<span class="selector-tag">Editer</span></div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Shift</span>+<span class="selector-tag">X</span> 把当前选中的文本全部变味小写</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Shift</span>+<span class="selector-tag">Y</span> 把当前选中的文本全部变为小写</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Shift</span>+<span class="selector-tag">F</span> 格式化当前代码</div><div class="line"><span class="selector-tag">Ctrl</span>+<span class="selector-tag">Shift</span>+<span class="selector-tag">P</span> 定位到对于的匹配符(譬如&#123;&#125;) (从前面定位后面时,光标要在匹配符里面,后面到前面,则反之)</div></pre></td></tr></table></figure>
<ul>
<li><p>下面的快捷键是重构里面常用的,本人就自己喜欢且常用的整理一下(注:一般重构的快捷键都是Alt+Shift开头的了)</p>
<figure class="highlight dos"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">Alt+<span class="built_in">Shift</span>+R 重命名 (是我自己最爱用的一个了,尤其是变量和类的<span class="built_in">Rename</span>,比手工方法能节省很多劳动力)</div><div class="line">Alt+<span class="built_in">Shift</span>+M 抽取方法 (这是重构里面最常用的方法之一了,尤其是对一大堆泥团代码有用)</div><div class="line">Alt+<span class="built_in">Shift</span>+C 修改函数结构(比较实用,有N个函数调用了这个方法,修改一次搞定)</div><div class="line">Alt+<span class="built_in">Shift</span>+L 抽取本地变量( 可以直接把一些魔法数字和字符串抽取成一个变量,尤其是多处调用的时候)</div><div class="line">Alt+<span class="built_in">Shift</span>+F 把Class中的local变量变为field变量 (比较实用的功能)</div><div class="line">Alt+<span class="built_in">Shift</span>+I 合并变量(可能这样说有点不妥Inline)</div><div class="line">Alt+<span class="built_in">Shift</span>+V 移动函数和变量(不怎么常用)</div><div class="line">Alt+<span class="built_in">Shift</span>+Z 重构的后悔药(Undo)</div></pre></td></tr></table></figure>
</li>
<li><p>编辑</p>
<figure class="highlight dos"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">全局 查找并替换 Ctrl+F </div><div class="line">文本编辑器 查找上一个 Ctrl+<span class="built_in">Shift</span>+K </div><div class="line">文本编辑器 查找下一个 Ctrl+K </div><div class="line">全局 撤销 Ctrl+Z </div><div class="line">全局 复制 Ctrl+C </div><div class="line">全局 恢复上一个选择 Alt+<span class="built_in">Shift</span>+↓ </div><div class="line">全局 剪切 Ctrl+X </div><div class="line">全局 快速修正 Ctrl1+<span class="number">1</span> </div><div class="line">全局 内容辅助 Alt+/ </div><div class="line">全局 全部选中 Ctrl+A </div><div class="line">全局 删除 Delete </div><div class="line">全局 上下文信息 Alt+？</div><div class="line">Alt+<span class="built_in">Shift</span>+?</div><div class="line">Ctrl+<span class="built_in">Shift</span>+Space </div><div class="line">Java编辑器 显示工具提示描述 F2 </div><div class="line">Java编辑器 选择封装元素 Alt+<span class="built_in">Shift</span>+↑ </div><div class="line">Java编辑器 选择上一个元素 Alt+<span class="built_in">Shift</span>+← </div><div class="line">Java编辑器 选择下一个元素 Alt+<span class="built_in">Shift</span>+→ </div><div class="line">文本编辑器 增量查找 Ctrl+J </div><div class="line">文本编辑器 增量逆向查找 Ctrl+<span class="built_in">Shift</span>+J </div><div class="line">全局 粘贴 Ctrl+V </div><div class="line">全局 重做 Ctrl+Y</div></pre></td></tr></table></figure>
</li>
<li><p>查看</p>
<figure class="highlight fix"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="attr">作用域 功能 快捷键 </span></div><div class="line"><span class="attr">全局 放大 Ctrl+</span>=<span class="string"> </span></div><div class="line"><span class="string">全局 缩小 Ctrl+-</span></div></pre></td></tr></table></figure>
</li>
<li><p>窗口</p>
<figure class="highlight armasm"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">全局 激活编辑器 F12 </div><div class="line">全局 切换编辑器 Ctrl+Shift+W </div><div class="line">全局 上一个编辑器 Ctrl+Shift+<span class="built_in">F6</span> </div><div class="line">全局 上一个视图 Ctrl+Shift+<span class="built_in">F7</span> </div><div class="line">全局 上一个透视图 Ctrl+Shift+F8 </div><div class="line">全局 下一个编辑器 Ctrl+<span class="built_in">F6</span> </div><div class="line">全局 下一个视图 Ctrl+<span class="built_in">F7</span> </div><div class="line">全局 下一个透视图 Ctrl+F8 </div><div class="line">文本编辑器 显示标尺上下文菜单 Ctrl+W </div><div class="line">全局 显示视图菜单 Ctrl+F10 </div><div class="line">全局 显示系统菜单 Alt+-</div></pre></td></tr></table></figure>
</li>
<li><p>导航</p>
<figure class="highlight mipsasm"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line"><span class="keyword">Java编辑器 </span>打开结构 Ctrl+F3 </div><div class="line">全局 打开类型 Ctrl+<span class="keyword">Shift+T </span></div><div class="line">全局 打开类型层次结构 F4 </div><div class="line">全局 打开声明 F3 </div><div class="line">全局 打开外部<span class="keyword">javadoc </span><span class="keyword">Shift+F2 </span></div><div class="line">全局 打开资源 Ctrl+<span class="keyword">Shift+R </span></div><div class="line">全局 后退历史记录 Alt+← </div><div class="line">全局 前进历史记录 Alt+→ </div><div class="line">全局 上一个 Ctrl+, </div><div class="line">全局 下一个 Ctrl+. </div><div class="line"><span class="keyword">Java编辑器 </span>显示大纲 Ctrl+O </div><div class="line">全局 在层次结构中打开类型 Ctrl+<span class="keyword">Shift+H </span></div><div class="line">全局 转至匹配的括号 Ctrl+<span class="keyword">Shift+P </span></div><div class="line">全局 转至上一个编辑位置 Ctrl+Q </div><div class="line"><span class="keyword">Java编辑器 </span>转至上一个成员 Ctrl+<span class="keyword">Shift+↑ </span></div><div class="line"><span class="keyword">Java编辑器 </span>转至下一个成员 Ctrl+<span class="keyword">Shift+↓ </span></div><div class="line">文本编辑器 转至行 Ctrl+L</div></pre></td></tr></table></figure>
</li>
<li><p>搜索</p>
<figure class="highlight dos"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">全局 出现在文件中 Ctrl+<span class="built_in">Shift</span>+U </div><div class="line">全局 打开搜索对话框 Ctrl+H </div><div class="line">全局 工作区中的声明 Ctrl+G </div><div class="line">全局 工作区中的引用 Ctrl+<span class="built_in">Shift</span>+G</div></pre></td></tr></table></figure>
</li>
<li><p>文本编辑</p>
<figure class="highlight mathematica"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">文本编辑器 改写切换 <span class="keyword">Insert</span> </div><div class="line">文本编辑器 上滚行 Ctrl+↑ </div><div class="line">文本编辑器 下滚行 Ctrl+↓</div></pre></td></tr></table></figure>
</li>
<li><p>文件</p>
<figure class="highlight armasm"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">全局 保存 Ctrl+X </div><div class="line"><span class="symbol">Ctrl</span>+S </div><div class="line">全局 打印 Ctrl+P </div><div class="line">全局 关闭 Ctrl+<span class="built_in">F4</span> </div><div class="line">全局 全部保存 Ctrl+Shift+S </div><div class="line">全局 全部关闭 Ctrl+Shift+<span class="built_in">F4</span> </div><div class="line">全局 属性 Alt+Enter </div><div class="line">全局 新建 Ctrl+N</div></pre></td></tr></table></figure>
</li>
<li><p>项目</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">全局 全部构建 Ctrl+B</div></pre></td></tr></table></figure>
</li>
<li><p>源代码</p>
<figure class="highlight dos"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">Java编辑器 格式化 Ctrl+<span class="built_in">Shift</span>+F </div><div class="line">Java编辑器 取消注释 Ctrl+\ </div><div class="line">Java编辑器 注释 Ctrl+/ </div><div class="line">Java编辑器 添加导入 Ctrl+<span class="built_in">Shift</span>+M </div><div class="line">Java编辑器 组织导入 Ctrl+<span class="built_in">Shift</span>+O </div><div class="line">Java编辑器 使用try/catch块来包围 未设置，太常用了，所以在这里列出,建议自己设置。</div><div class="line">也可以使用Ctrl+<span class="number">1</span>自动修正。</div></pre></td></tr></table></figure>
</li>
<li><p>运行</p>
<figure class="highlight armasm"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">全局 单步返回 <span class="built_in">F7</span> </div><div class="line">全局 单步跳过 <span class="built_in">F6</span> </div><div class="line">全局 单步跳入 <span class="built_in">F5</span> </div><div class="line">全局 单步跳入选择 Ctrl+<span class="built_in">F5</span> </div><div class="line">全局 调试上次启动 F11 </div><div class="line">全局 继续 F8 </div><div class="line">全局 使用过滤器单步执行 Shift+<span class="built_in">F5</span> </div><div class="line">全局 添加/去除断点 Ctrl+Shift+<span class="keyword">B </span></div><div class="line">全局 显示 Ctrl+D </div><div class="line">全局 运行上次启动 Ctrl+F11 </div><div class="line">全局 运行至行 Ctrl+R </div><div class="line">全局 执行 Ctrl+U</div></pre></td></tr></table></figure>
</li>
<li><p>重构</p>
<figure class="highlight dos"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">作用域 功能 快捷键 </div><div class="line">全局 撤销重构 Alt+<span class="built_in">Shift</span>+Z </div><div class="line">全局 抽取方法 Alt+<span class="built_in">Shift</span>+M </div><div class="line">全局 抽取局部变量 Alt+<span class="built_in">Shift</span>+L </div><div class="line">全局 内联 Alt+<span class="built_in">Shift</span>+I </div><div class="line">全局 移动 Alt+<span class="built_in">Shift</span>+V </div><div class="line">全局 重命名 Alt+<span class="built_in">Shift</span>+R </div><div class="line">全局 重做 Alt+<span class="built_in">Shift</span>+Y</div></pre></td></tr></table></figure>
</li>
</ul>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/eclipse/">eclipse</a><a href="/tags/java/">java</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/05/26/eclipse-quick-key/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/05/26/eclipse-quick-key/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>






   
    
    <article class="post-expand post" itemprop="articleBody"> 
        <header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2016/05/26/eclipse-quick-key-invalid/" title="eclipse 快捷键之Ctrl+Alt+Down和Ctrl+Alt+Up 失效" itemprop="url">eclipse 快捷键之Ctrl+Alt+Down和Ctrl+Alt+Up 失效</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="linyu" target="_blank" itemprop="author">linyu</a>
		
  <p class="article-time">
    <time datetime="2016-05-26T02:15:29.000Z" itemprop="datePublished"> 發表於 2016-05-26</time>
    
  </p>
</header>
    <div class="article-content">
        
        <ul>
<li>Eclipse中Ctrl+Alt+Down和Ctrl+Alt+Up不起作用，第一想到的就是软件冲突，大多数网上的都是这么说，其他软件冲突的话可能有什么千千静听、QQ音乐之类的。</li>
<li>还有很多人遇到这种情况，Ctrl+Alt+Down和Ctrl+Alt+Up可能使屏幕上下颠倒，那么，屏幕右下角，显卡图标点右键-&gt;图形选项-&gt;快捷键-&gt;禁用即可。找不到的话在桌面右键-&gt;图形选项-.快捷键-&gt;禁用  </li>
<li>如果是上面这种情况，可能设置了快捷键禁用还不行的话，那么必须设置图形属性，桌面右键——图形属性——打开显卡控制面板，点击选项与支持——管理快捷键先设置为启动——修改旋转xxx度的快捷键为其他，尽量设置为复杂不常用的，点击应用——最后再禁用即可。</li>
</ul>

        
        
        <p class="article-more-link">
          
       </p>
    </div>
    <footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/eclipse/">eclipse</a><a href="/tags/java/">java</a>
  </div>

</div>




<div class="comments-count">
	
	  	<span></span>
		<a href="/2016/05/26/eclipse-quick-key-invalid/#comments" class="ds-thread-count comments-count-link" data-thread-key="2016/05/26/eclipse-quick-key-invalid/" data-count-type="comments">&nbsp;</a>
	
</div>

</footer>


    </article>







  <nav id="page-nav" class="clearfix">
    <a class="extend prev" rel="prev" href="/page/3/"><span></span>Prev</a><a class="page-number" href="/">1</a><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><span class="page-number current">4</span><a class="page-number" href="/page/5/">5</a><a class="page-number" href="/page/6/">6</a><a class="extend next" rel="next" href="/page/5/">Next<span></span></a>
  </nav>

</div>
      <div class="openaside"><a class="navbutton" href="#" title="顯示側邊欄"></a></div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="隱藏側邊欄"></a></div>
<aside class="clearfix">

  
<div class="github-card">
<p class="asidetitle">Github 名片</p>
<div class="github-card" data-github="bigsuperangel" data-width="220" data-height="119" data-theme="medium">
<script type="text/javascript" src="//cdn.jsdelivr.net/github-cards/latest/widget.js" ></script>
</div>
  </div>



  

  
<div class="tagslist">
	<p class="asidetitle">標簽</p>
		<ul class="clearfix">
		
			
				<li><a href="/tags/linux/" title="linux">linux<sup>16</sup></a></li>
			
		
			
				<li><a href="/tags/ubuntu/" title="ubuntu">ubuntu<sup>11</sup></a></li>
			
		
			
				<li><a href="/tags/java/" title="java">java<sup>10</sup></a></li>
			
		
			
				<li><a href="/tags/maven/" title="maven">maven<sup>7</sup></a></li>
			
		
			
				<li><a href="/tags/mysql/" title="mysql">mysql<sup>4</sup></a></li>
			
		
			
				<li><a href="/tags/python/" title="python">python<sup>3</sup></a></li>
			
		
			
				<li><a href="/tags/tomcat/" title="tomcat">tomcat<sup>3</sup></a></li>
			
		
			
				<li><a href="/tags/alsamixer/" title="alsamixer">alsamixer<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/git/" title="git">git<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/hexo/" title="hexo">hexo<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/command/" title="command">command<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/eclipse/" title="eclipse">eclipse<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/doc命令/" title="doc命令">doc命令<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/database/" title="database">database<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/nodejs/" title="nodejs">nodejs<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/freenom/" title="freenom">freenom<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/gradle/" title="gradle">gradle<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/ignore/" title="ignore">ignore<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/security/" title="security">security<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/jitpack/" title="jitpack">jitpack<sup>1</sup></a></li>
			
		
		</ul>
</div>


  <div class="linkslist">
  <p class="asidetitle">友情鏈接</p>
    <ul>
        
          <li>
            
            	<a href="https://www.oschina.net" target="_blank" title="开源中国">开源中国</a>
            
          </li>
        
          <li>
            
            	<a href="http://stackoverflow.com" target="_blank" title="stackoverflow">stackoverflow</a>
            
          </li>
        
    </ul>
</div>

  


  <div class="rsspart">
	<a href="/atom.xml" target="_blank" title="rss">RSS 訂閱</a>
</div>

  <div class="weiboshow">
  <p class="asidetitle">新浪微博</p>
    <iframe width="100%" height="119" class="share_self"  frameborder="0" scrolling="no" src="http://widget.weibo.com/weiboshow/index.php?language=&width=0&height=119&fansRow=2&ptype=1&speed=0&skin=9&isTitle=1&noborder=1&isWeibo=0&isFans=0&uid=null&verifier=&dpc=1"></iframe>
</div>


</aside>
</div>
    </div>
    <footer><div id="footer" >
	
	<div class="line">
		<span></span>
		<div class="author"></div>
	</div>
	
	
	<section class="info">
		<p> 知行合一 <br/>
			This is my blog,believe it or not.</p>
	</section>
	 
	<div class="social-font" class="clearfix">
		
		
		<a href="https://github.com/bigsuperangel" target="_blank" class="icon-github" title="github"></a>
		
		
		
		
		
		
		
		
		
		<a href="mailto:bigsuperangel@gmail.com" target="_blank" class="icon-email" title="Email Me"></a>
		
	</div>
			
		

		<p class="copyright">
		Powered by <a href="http://hexo.io" target="_blank" title="hexo">hexo</a> and Theme by <a href="https://github.com/wuchong/jacman" target="_blank" title="Jacman">Jacman</a> © 2019 
		
		<a href="/about" target="_blank" title="linyu">linyu</a>
		
		
		</p>
</div>
</footer>
    <script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script src="/js/jquery.qrcode-0.12.0.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
  
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else{
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
        
    }
  });
});
</script>










<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.article-content').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;
      var alt = this.alt;
      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
    });
    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });
  if($.fancybox){
    $('.fancybox').fancybox();
  }
}); 
</script>



<!-- Analytics Begin -->

<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-84488915-1', 'bigsuperangel.github.io');  
ga('send', 'pageview');
</script>





<!-- Analytics End -->

<!-- Totop Begin -->

	<div id="totop">
	<a title="返回頂部"><img src="/img/scrollup.png"/></a>
	</div>
	<script src="/js/totop.js"></script>

<!-- Totop End -->

<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->


<!-- MathJax End -->

<!-- Tiny_search Begin -->

<!-- Tiny_search End -->

  </body>
 </html>
